const express = require('express');
const router = express.Router();
const {server} = require("../../controllers");
const { verifyToken } = require("../verifyToken"); // 引入 verifyToken 函数，用于验证 token

// 获取日记
router.post('/getDiary',  (req, res) => server.getDiaryPage(req, res));
// 删除日记
router.post('/deleteDiary', verifyToken, (req, res) => server.deleteDiary(req, res));
// 新建日记
router.post('/addDiary', verifyToken, (req, res) => server.addDiary(req, res));

module.exports = router;

  
  